import Layout from '@/views/layout/Layout'

const shoppingCentreRouter = {
  path: "/shoppingCentre",
  component: Layout,
  redirect: "/shoppingCentre/shoppingCentre",
  name: "shoppingCentre",
  alwaysShow: true,
  meta: {
    title: "商城中心",
    icon: "shopping",
    roles: 'mall_center'
  },
  children : [
    {
      path: "shoppingCenter",
      component: () => import("@/views/shoppingCentre/shoppingCenter"),
      name: "shoppingCenter",
      alwaysShow: true,
      meta: {
        title: "商品中心",
        roles: 'mall_center_product_center',
      },
      children : [
        {
          path: 'classifyAdmin',
          component: () => import('@/views/shoppingCentre/productCenter/classifyAdmin/classifyAdmin'),
          name: 'classifyAdmin',
          meta: {
            title: '分类管理',
            roles : 'mall_center_goods_category'
          }
        },
        {
          path: 'brandAdmin',
          component: () => import('@/views/shoppingCentre/productCenter/brandAdmin/brandAdmin'),
          name: 'brandAdmin',
          meta: {
            title: '品牌管理',
            roles : 'mall_center_goods_brand'
          }
        },
        {
          path: 'freightAdmin',
          component: () => import('@/views/shoppingCentre/productCenter/freightAdmin/freightAdmin'),
          name: 'freightAdmin',
          meta: {
            title: '运费模板管理',
            roles : 'mall_center_goods_fright_template'
          }
        },
        {
          path: 'productAdmins',
          component: () => import('@/views/shoppingCentre/productCenter/productAdmin/productAdmin'),
          name: 'productAdmins',
          meta: {
            title: '商品管理',
            roles : 'mall_center_goods_manager'
          }
        },
        {
          path: 'Ios_Android_Class',
          component: () => import('@/views/shoppingCentre/productCenter/Ios_Android_Class/Ios_Android_Class'),
          name: 'Ios_Android_Class',
          meta: {
            title: '前台分类',
            roles : 'mall_goods_front_tree'
          }
        },
        {
          path: 'add_Ios_Android_Class',
          component: () => import('@/views/shoppingCentre/productCenter/Ios_Android_Class/addIos_Android_Class/add_Ios_Android_Class'),
          name: 'add_Ios_Android_Class',
          hidden : true,
          meta: {
            title: '新增分类树',
            roles : 'mall_center_goods_manager'
          }
        },
        {
          path: 'basics',
          component: () => import('@/views/shoppingCentre/productCenter/productAdmin/component/basics/basic'),
          name: 'basics',
          hidden : true,
          meta: {
            title: '商品基本信息',
            roles : 'mall_center_goods_manager'
          }
        },
        {
            path: 'attribute',
            component: () => import('@/views/shoppingCentre/productCenter/Attribute/attribute'),
            name: 'attribute',
            meta: {
              title: '属性管理',
              roles : 'mall_center_goods_attr_manager'
            }
          },
          {
            path: 'attrVal',
            component: () => import('@/views/shoppingCentre/productCenter/Attribute/attrVal'),
            name: 'attrVal',
            hidden:true,
            meta: {
              title: '属性详情',
              roles : 'mall_center_goods_attr_manager'
            }
          },
      ]
    },
    {
      path: "productQuality",
      component: () => import("@/views/shoppingCentre/productQuality/productQuality"),
      name: "productQuality",
      alwaysShow: true,
      meta: {
        title: "商品质检中心",
        roles: 'mall_center_goods_quality',
      },
      children : [
        {
          path: 'qualityOption',
          component: () => import('@/views/shoppingCentre/productQuality/qualityOption/qualityOption'),
          name: 'qualityOption',
          meta: {
            title: '质检选项管理',
            roles : 'mall_center_quality_attr'
          }
        },
        {
          path: 'addAttributeVal',
          component: () => import('@/views/shoppingCentre/productQuality/qualityOption/addAttributeVal/addAttributeVal'),
          name: 'addAttributeVal',
          hidden : true,
          meta: {
            title: '添加属性值',
            roles : 'mall_center_recomm_floor'
          }
        },
        {
          path: 'qualityClass',
          component: () => import('@/views/shoppingCentre/productQuality/qualityClass/qualityClass'),
          name: 'qualityClass',
          meta: {
            title: '质检类别管理',
            roles : 'mall_center_quality_attr'
          }
        },
        {
          path: 'qualityCourse',
          component: () => import('@/views/shoppingCentre/productQuality/qualityCourse/qualityCourse'),
          name: 'qualityCourse',
          meta: {
            title: '质检科目管理',
            roles : 'mall_center_zj_subject'
          }
        },
        {
          path: 'addGrouping',
          component: () => import('@/views/shoppingCentre/productQuality/qualityCourse/addGrouping/addGrouping'),
          name: 'addGrouping',
          hidden : true,
          meta: {
            title: '添加分组',
            roles : 'mall_center_recomm_floor'
          }
        },
        {
          path: 'qualityUser',
          component: () => import('@/views/shoppingCentre/productQuality/qualityUser/qualityUser'),
          name: 'qualityUser',
          meta: {
            title: '质检人员管理',
            roles : 'mall_center_zj_users'
          }
        },
        {
          path: 'qualityReport',
          component: () => import('@/views/shoppingCentre/productQuality/qualityReport/qualityReport'),
          name: 'qualityReport',
          meta: {
            title: '质检报告管理',
            roles : 'mall_center_zj_report'
          }
        },
        {
          path: 'qualityFlow',
          component: () => import('@/views/shoppingCentre/productQuality/qualityFlow/qualityFlow'),
          name: 'qualityFlow',
          meta: {
            title: '质检流程管理',
            roles : 'quality_procedure_manager'
          }
        },
        {
          path: 'addqualityFlow',
          component: () => import('@/views/shoppingCentre/productQuality/qualityFlow/addqualityFlow/addqualityFlow'),
          name: 'addqualityFlow',
          hidden : true,
          meta: {
            title: '新增质检流程管理',
          }
        },
      ]
    },
    {
      path: "indentCenter",
      component: () => import("@/views/shoppingCentre/indentCenter/indentCenter"),
      name: "indentCenter",
      alwaysShow: true,
      meta: {
        title: "订单管理",
        roles: 'mall_center_order',
      },
      children : [
        {
          path: 'indentAdmin',
          component: () => import('@/views/shoppingCentre/indentCenter/indentAdmin/indentAdmin'),
          name: 'indentAdmin',

          meta: {
            title: '订单管理',
            roles : 'mall_good_order_mgr'
          }
        },
        {
            path: 'indentDetails',
            component: () => import('@/views/shoppingCentre/indentCenter/indentAdmin/indentDetails/indentDetails.vue'),
            name: 'indentDetails',
            hidden:true,
            meta: {
              title: '订单详情',
              roles : 'mall_good_order_mgr'
            }
          },

        {
          path: 'afterAdmin',
          component: () => import('@/views/shoppingCentre/indentCenter/afterAdmin/afterAdmin'),
          name: 'afterAdmin',
          meta: {
            title: '售后管理',
            roles : 'mall_center_order_after_mgr'
          }
        },
        {
            path : 'detail',
            component: () => import('@/views/shoppingCentre/indentCenter/afterAdmin/details/details.vue'),
            name : 'detail',
            hidden:true,
            meta: {
              title: '售后详情',
              roles : 'mall_good_order_mgr'
            }
          },
      ]
    },
    {
      path: "productRecommend",
      component: () => import("@/views/shoppingCentre/productRecommend/productRecommend"),
      name: "productRecommend",
      alwaysShow: true,
      meta: {
        title: "商品推荐管理",
        roles: 'mall_center_recommend_mgr',
      },
      children : [
        {
          path: 'hotSearch',
          component: () => import('@/views/shoppingCentre/productRecommend/hotSearch/hotSearch'),
          name: 'hotSearch',
          meta: {
            title: '热门搜索',
            roles : 'mall_center_hot_search'
          }
        },
        {
          path: 'recommendFloor',
          component: () => import('@/views/shoppingCentre/productRecommend/recommendFloor/recommendFloor'),
          name: 'recommendFloor',
          meta: {
            title: '推荐类型(楼层)',
            roles : 'mall_center_recomm_floor'
          }
        },
        {
          path: 'correlation',
          component: () => import('@/views/shoppingCentre/productRecommend/recommendFloor/child/correlation'),
          name: 'correlation',
            hidden : true,
          meta: {
            title: '关联商品',
            roles : 'mall_center_recomm_floor'
          }
        },
        // {
        //   path: 'floorProduct',
        //   component: () => import('@/views/shoppingCentre/productRecommend/floorProduct/floorProduct'),
        //   name: 'floorProduct',
        //   meta: {
        //     title: '楼层推荐商品',
        //     roles : 'mall_center_recommod_floor_goods'
        //   }
        // },
      ]
    }
  ]
}
export default shoppingCentreRouter
